home *** CD-ROM | disk | FTP | other *** search
- Path: utopia.hacktic.nl!not-for-mail
- From: Mike Tavares <MIKET@cdynamics.com>
- Newsgroups: comp.lang.c++
- Subject: How do I prevent deleting of an object that is still being used?
- Date: 16 Jan 1996 14:35:19 +0100
- Organization: Hack-Tic International, Inc.
- Sender: remailer@utopia.hacktic.nl
- Message-ID: <4dg9in$s5h@utopia.hacktic.nl>
- NNTP-Posting-Host: utopia.hacktic.nl
- Comment: This message was forwarded by an automated remailing service.
- Comment: No attempt was made to verify the sender's identity.
- Comment: Please report misuse to <postmaster@utopia.hacktic.nl>
-
-
- I have some classes:
-
- class menuItem
- {
- ...
-
- }
-
-
-
- class menu
- {
-
- list<menuItem> theItems // the items that are on this menu.
-
- Register( menuItem &anItem );
-
- }
-
-
- A menuItem can be on more than one menu. When a menu is deleted it
- should delete all its menuItems UNLESS they are on another menu. What is
- the typical way of setting this up. I've heard of "contact" objects and
- "plug and socket" objects but I've never seen an implementation
- pattern. any help is appreciated.
-
- =MikeT
-
- PS. I'm posting from an remailer because my providers outgoing news is
- broken, I get new articles just fine and you can reply to this article
- and it will be addressed to me directly. Thanks again.
-
- ---------------------------------------------------------------------
- | Mike Tavares | miket@cdynamics.com | |
- | Software Engineer | | If you're not lead |
- | ----- | ----- | dog the view never |
- | Computer Dynamics | (803) 627-8800 | changes. |
- | 7640 Pelham Rd | EXT - 232 | |
- | Greenville, SC 29615 | Fax. (803) 675-0106 | Email for PGP key |
- |==================================================================== |
- | Computer Dynamics - The Flat Panel Experts |
- ---------------------------------------------------------------------
-
-
-